package com.ck.server;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * @author ck
 * @date 2023/3/23 14:48
 */
@SpringBootTest
@RunWith(SpringRunner.class)
public class psdEncode {
    @Autowired
    PasswordEncoder passwordEncoder;

    @Test
    public void test1(){
        String encode = passwordEncoder.encode("ck1217");
        boolean matches = passwordEncoder.matches("ck1217", encode);
        System.out.println(encode);
        System.out.println(matches);
    }

    @Test
    public void test2(){
    }

}
